package com.ruoyi.business.sundry.domain;

import com.ruoyi.business.base.JoBaseEntity;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;

import java.math.BigDecimal;
import java.math.RoundingMode;

/**
 * 商品配方对象 jb_product_recipe
 *
 * @author ruoyi
 * @date 2024-10-11
 */
@Data
public class JbProductRecipe extends JoBaseEntity
{
    private static final long serialVersionUID = 1L;

    /**
     * 商品ID
     */
    @Excel(name = "商品ID")
    private String commodityId;

    /**
     * 商品名称
     */
    @Excel(name = "商品名称")
    private String productName;

    /**
     * 农药登记证号
     */
    @Excel(name = "农药登记证号")
    private String pesticideRegistrationNumber;

    /**
     * 单位含量 规则
     */
    @Excel(name = "单位含量")
    private String productSpecification;
    /**
     * 含量单位 规则
     */
    @Excel(name = "含量单位")
    private String productSpecificationUnit;

    /**
     * 库存成本
     */
    @Excel(name = "库存成本-箱")
    private BigDecimal inventoryCost;
    @Excel(name = "库存成本-核算单价")
    private BigDecimal inventoryUnitCost;

    /**
     * 实时成本
     */
    @Excel(name = "实时成本")
    private BigDecimal realTimeCost;

    /**
     * 备注
     */
    @Excel(name = "备注")
    private String remark;

    public void setInventoryCost(BigDecimal inventoryCost)
    {
        // 返回格式化后的字符串表示
        this.inventoryCost = inventoryCost.setScale(2, RoundingMode.HALF_UP);
    }

}
